import RoomFactory from "./RoomFactory"

export default class RoomArrayFactory {
  roomFactory: RoomFactory
  constructor() {
    this.roomFactory = new RoomFactory()
  }
  create(t, e) {
    e = e || { rooms: [] }
    for (let s = 0; s < t.rooms.length; ++s) e.rooms[s] = this.roomFactory.create(t.rooms[s], e.rooms[s])
    return (e.rooms.length = t.rooms.length), e
  }
}
